package ltd.dujiabao.orderservice.domain.dto;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

/**
 * @author Bowie Du
 * @date 2025/7/9 22:00
 */

@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class CreateOrderDto {
    @NotNull(message = "userId cannot be null")
    private Long userId;

    @NotNull(message = "productId cannot be null")
    private Long productId;

    @NotNull(message = "quantity cannot be null")
    @Min(value = 1, message = "quantity cannot be less than 1")
    private Integer quantity;
}
